//
//  topicCell.m
//  ILiangCang
//
//  Created by ZX on 16-4-17.
//  Copyright (c) 2016年 CRQ. All rights reserved.
//

#import "topicCell.h"
#import "Masonry.h"

@implementation topicCell

- (void)awakeFromNib {
    // Initialization code
}

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self)
    {
        //定义CELL单元格内容
        _coverImage = [[UIImageView alloc]init];
        _coverImage.backgroundColor = [UIColor clearColor];
        [self addSubview:_coverImage];
        [_coverImage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.bottom.right.offset(0);
        }];
        _shadowImage = [[UIImageView alloc]init];
        _shadowImage.backgroundColor = [UIColor blackColor];
        _shadowImage.alpha = 0.4;
        [self addSubview:_shadowImage];
        [_shadowImage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.bottom.right.offset(0);
        }];
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.backgroundColor = [UIColor clearColor];
        _titleLabel.font = [UIFont systemFontOfSize:14];
//        _titleLabel.text = @"wakakakkakakakak";
        _titleLabel.TextColor = [UIColor whiteColor];
        [self addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.mas_equalTo(self.mas_centerX);
            make.centerY.mas_equalTo(self.mas_centerY);
        }];
        
        _classLabel = [[UILabel alloc]init];
        _classLabel.backgroundColor = [UIColor clearColor];
        _classLabel.font = [UIFont systemFontOfSize:11];
        _classLabel.textColor = [UIColor whiteColor];
        [self addSubview:_classLabel];

        [_classLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.mas_equalTo(self.mas_centerX);
            make.centerY.mas_equalTo(self.mas_centerY).with.offset(20);
            
        }];
        
        
    }
    
    return self;
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
